1. Field of the Invention
This invention relates to the field of data processing systems. More particularly, this invention relates to the management of page table data within such data processing systems.
2. Description of the Prior Art
It is known to provide data processing systems with page table data for managing regions of memory. For example, such page table data may specify mappings between virtual addresses and physical addresses, access permissions to pages of data and other properties of the pages of data, such as whether or not they may be cached. It is known to include dirty bit information within the page table data to indicate that a page of data has been modified since it was copied into the working memory, for example from a non-volatile storage such as a hard disk drive. Such dirty bit information is useful as when a page of data is being removed from the working memory and back to the non-volatile storage, if the dirty bit for that page indicates that it has not been modified, then there is no need to copy that page of data back to the non-volatile storage. Furthermore, such dirty bit information may be used to identify likely candidates to be paged out (copy back from the working memory to the non-volatile storage) when it is desired to page in (copy from the non-volatile storage to the working memory) a new page of data.
One way of managing such dirty bit information is to provide memory management unit hardware with the capability of updating dirty bit information associated with the pages of memory when a first write access is made to a memory address within that page of memory. Such hardware based updating of dirty bit information within the page table data has the advantage of speed, but it does increase the complexity of the hardware.
Another approach to the management of the dirty status of pages of memory within the memory address space is to use software based management. In this technique each new page which is paged in is marked as read only. If a write is attempted to this page, then a software exception is generated. The software exception handling program can then determine whether or not the page is permitted to be written. If writing is allowed, then the status of the page is changed to write permitted and the page is marked as dirty. If writing is not allowed to that page, then the write permission failure exception is further processed in a normal way. Such software based management techniques serve to trap a first write to a page of data and mark the page as dirty. Thereafter, the page is marked to permit writes without generating an exception and so further write operations will not be slowed. A problem with this approach is that the processing circuitry which generates the write that triggers the exception would normally need to have the capability of executing the software exception handling requirements. Processing circuitry which did not have this capability to itself handle the execution of the exception handling code could trigger an interrupt to a different processing circuitry which would then perform the exception handling on its behalf. However, this approach is slow.
A further problem with the prior art is that it is not possible to mix the hardware base management of the dirty status with the software base management of the dirty status within a system sharing the same page table data, e.g. a shared virtual memory system. The hardware based approach relies upon a page being properly marked as write permitted from the outset with a hardware based update to dirty status being made upon a first write to that page. In contrast, the software based approach relies upon the page being marked as write not permitted when it is first placed in the working memory, with this status being used to trigger an exception and a change to the page being marked as write permitted and the dirty status being set upon a first access to that page. The use of the page table data is thus incompatible between these two approaches.